package Lab1;

public class Person {
	String firstName;
	String lastName;
	int age;
	String favThing;
	
	static int equalscounter;
	
	public Person(String inFirstName, String inLastName, int inAge, String inFavThing) {
		firstName = inFirstName;
		lastName = inLastName;
		age = inAge;
		favThing = inFavThing;
		equalscounter = 0;
	}
	
	public String getFirstName() {
		return firstName;
	}
	
	public String getLastName() {
		return lastName;
	}
	
	public int getAge() {
		return age;
	}
	
	public String getFavThing() {
		return favThing;
	}
	
	public static int getEqualsCounter() {
		return equalscounter;
	}
	
	public boolean equals(Object compare) {
		Person guy = (Person) compare;
		String firstNameOne = getFirstName();
		String firstNameSecond = guy.getFirstName();
		equalscounter += 1;
		
		return firstNameOne.equals(firstNameSecond);
	}
}
